Ext.onReady(function() {

			Ext.QuickTips.init();

			var store = new Ext.data.SimpleStore({
						fields	: ['firstName', 'lastName', 'name'],
						data	: [['kevin', 'nick'], ['lee', 'lee']]
					});

			var grid = new Ext.grid.EditorGridPanel({
						store		: store,
						colModel	: new Ext.grid.ColumnModel({
									columns		: [{
												header		: 'First Name',
												dataIndex	: 'firstName',
												editor		: new Ext.form.TextField()
											}, {
												header		: 'Last Name',
												dataIndex	: 'lastName',
												editor		: new Ext.form.TextField()
											}, {
												header			: 'Name',
												dataIndex		: 'name',
												menuDisabled	: false,
												/**
												 * 注意此处 仅显示格式化 无保存功能.
												 * 
												 */
												renderer		: function(v, metaData, rec, rowIdx, colIndex, store) {
							 						return rec.data.firstName + ' ' + rec.data.lastName;
												}
											}],
									defaults	: {
										sortable		: true,
										menuDisabled	: true,
										width			: 100
									}
								}),
						tbar		: [{
									text	: 'Show Column(s) [firstName]',
									iconCls	: 'tag-blue-add',
									handler	: function() {
										grid.showColumn('firstName');
									}
								}, {
									text	: 'Hide Column(s) [firstName]',
									iconCls	: 'tag-blue-delete',
									handler	: function() {
										grid.hideColumn('firstName');
									}
								}, '->', {
									text	: 'Add Column(s) [C, D]',
									iconCls	: 'tab-add',
									handler	: function() {
										grid.addColumn('C');
										grid.addColumn({
													name			: 'D',
													defaultValue	: 'D2'
												}, {
													header		: 'D',
													dataIndex	: 'D'
												});
									}
								}, {
									text	: 'Remove Column(s) [firstName, D]',
									iconCls	: 'tab-delete',
									handler	: function() {
										grid.removeColumn('firstName');
										grid.removeColumn('D');
									}
								}, {
									text	: 'test',
									handler	: function() {
										alert(Ext.encode(getGridData()));
									}
								}]
					});

			grid.on('afteredit', function(e) {
						var rec = e.record;
						var colIdx = e.column;
					});

			function getGridData() {
				var recs = [];
				var len = store.getCount();
				for (i = 0, cnt = len; i < cnt; i += 1) {
					var rec = store.getAt(i);
					recs.push(rec.data);
				}

				return recs;
			}

			new Ext.Viewport({
						layout	: 'fit',
						items	: grid
					});
		});
